<template>
  <div class="employees-container">
    <div class="app-container">
      <el-card>
        <el-tabs>
          <el-tab-pane label="登录账户设置">
            <AccountSet :user-info="userInfo" />
          </el-tab-pane>
          <el-tab-pane label="个人详情">
            <AccountDetail :user-info="userInfo" />
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import AccountSet from './component/account-set.vue'
import AccountDetail from './component/account-detail.vue'
import { getUserDetailById } from '@/api/user.js'
export default {
  components: {
    AccountSet, AccountDetail
  },
  data() {
    return {
      userInfo: {}
    }
  },
  created () {
    this.getInfo()
  },
  methods: {
    async getInfo() {
      const res = await getUserDetailById(this.$route.params.id)
      this.userInfo = res
      console.log(this.userInfo)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
